package com.example.HelloWorld;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;


public class HelloworldActivity extends Activity {
	private Button button_dis;
	public final static String EXTRA_MESSAGE = "com.example.HelloWorld.message";

	/** Called when the activity is first created. */
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.main);
		
		button_dis = (Button) findViewById(R.id.button_dis);
		button_dis.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(HelloworldActivity.this,
						DisplayMessageActivity.class);
				EditText editText = (EditText) findViewById(R.id.edit_message);
				String message = editText.getText().toString();
				intent.putExtra(EXTRA_MESSAGE, message);
				startActivity(intent);
			}
		});
		
		MsgSend msgsend = new MsgSend(this);
		Button button = msgsend.getButton_send();
		
/*		button.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(HelloworldActivity.this,
						DisplayMessageActivity.class);
				EditText editText = (EditText) findViewById(R.id.edit_message);
				String message = editText.getText().toString();
				intent.putExtra(HelloworldActivity.EXTRA_MESSAGE, message);
				startActivity(intent);
			}
		});*/
		
	}
	
}